﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreatingTypes
{
    internal class _05Properties
    {

        private decimal _worth;
        //Expression-bodied属性
        public decimal Worth
        {
            get => _worth;
            set => _worth = value;
        }

        public int Pitch { get; init; } = 100;
        public int Duration { get; init; } = 50;

        public void PrintWorth()
        {
            Console.Write("值是" + _worth);
        }

    }
}
